Integrand size = 24, antiderivative size = 83 \[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\frac {i \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {2} d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3571, 3570, 212} \[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\frac {i \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {2} d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \]
[In]
[Out]
Rule 212
Rule 3570
Rule 3571
Rubi steps \begin{align*} \text {integral}& = -\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {1}{2} a \int \frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}} \, dx \\ & = -\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d}+\frac {(i a) \text {Subst}\left (\int \frac {1}{2-a x^2} \, dx,x,\frac {\sec (c+d x)}{\sqrt {a+i a \tan (c+d x)}}\right )}{d} \\ & = \frac {i \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \sec (c+d x)}{\sqrt {2} \sqrt {a+i a \tan (c+d x)}}\right )}{\sqrt {2} d}-\frac {i \cos (c+d x) \sqrt {a+i a \tan (c+d x)}}{d} \\ \end{align*}
Time = 0.68 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.05 \[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=-\frac {i e^{-i (c+d x)} \left (1+e^{2 i (c+d x)}-\sqrt {1+e^{2 i (c+d x)}} \text {arctanh}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right ) \sqrt {a+i a \tan (c+d x)}}{2 d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 363 vs. \(2 (68 ) = 136\).
Time = 17.33 (sec) , antiderivative size = 364, normalized size of antiderivative = 4.39
method | result | size |
default | \(-\frac {i \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \sin \left (d x +c \right )+\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \arctan \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right ) \cos \left (d x +c \right )+i \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right ) \cos \left (d x +c \right )+\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \arctan \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right )-i \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \arctan \left (\sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\right ) \sin \left (d x +c \right )+i \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )+2 \cos \left (d x +c \right )\right )}{2 d}\) | \(364\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 184 vs. \(2 (64) = 128\).
Time = 0.25 (sec) , antiderivative size = 184, normalized size of antiderivative = 2.22 \[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\frac {\sqrt {2} d \sqrt {-\frac {a}{d^{2}}} \log \left (\frac {2 \, {\left ({\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {a}{d^{2}}} + i \, a\right )} e^{\left (-i \, d x - i \, c\right )}}{d}\right ) - \sqrt {2} d \sqrt {-\frac {a}{d^{2}}} \log \left (-\frac {2 \, {\left ({\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {-\frac {a}{d^{2}}} - i \, a\right )} e^{\left (-i \, d x - i \, c\right )}}{d}\right ) - 2 \, \sqrt {2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} {\left (i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )}}{4 \, d} \]
[In]
[Out]
\[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \cos {\left (c + d x \right )}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 774 vs. \(2 (64) = 128\).
Time = 0.41 (sec) , antiderivative size = 774, normalized size of antiderivative = 9.33 \[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\int { \sqrt {i \, a \tan \left (d x + c\right ) + a} \cos \left (d x + c\right ) \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos (c+d x) \sqrt {a+i a \tan (c+d x)} \, dx=\int \cos \left (c+d\,x\right )\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}} \,d x \]
[In]
[Out]